{extend name="layout" /}
{block name="body"}
  <div class="row">
          
    <div class="col-lg-12">
      <div class="card">
        <ul class="nav nav-tabs page-tabs pt-2 pl-3 pr-3">
          {volist name="$tab_list" id="gvo"}
          <li  class="nav-item">
            <a href="{$gvo['url']}" class="nav-link {eq name="$group" value="$gvo['group']"} active{/eq}">{$gvo['title']}</a>
          </li>
          {/volist}
        </ul>
        <div class="tab-content">
          <div class="table-responsive">
            <table class="table table-bordered">
              <thead>
                <tr>
                  <th>
                    <div class="custom-control custom-checkbox">
                      <input type="checkbox" class="custom-control-input" id="check-all">
                      <label class="custom-control-label" for="check-all"></label>
                    </div>
                  </th>
                  <th>备份名称</th>
                  <th>卷数</th>
                  <th>压缩方式</th>
                  <th>数据大小</th>
                  <th>备份时间</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                {volist name="list" id="vo"}
                <tr>
                  <td>
                    <div class="custom-control custom-checkbox">
                      <input type="checkbox" class="custom-control-input ids" name="ids[]" value="{$vo.part}" id="ids-{$vo.part}">
                      <label class="custom-control-label" for="ids-{$vo.part}"></label>
                    </div>
                  </td>
                  <td>{$vo.name|date='Ymd-His'}</td>
                  <td>{$vo.part}</td>
                  <td>{$vo.compress}</td>
                  <td>{$vo.size|format_bytes}</td>
                  <td>{$vo.time|date='Y-m-d H:i:s'}</td>
                  <td>
                    <div class="btn-group">
                      {if condition="check_rule('admin/database/import', [1,2,3])"}
                      <a class="btn btn-xs btn-default ajax-get" href="{:url('database/import', 'time='.$vo['time'])}" title="还原" data-toggle="tooltip" data-original-title="还原"><i class="mdi mdi-replay"></i></a>
                      {/if}
                      {if condition="check_rule('admin/database/delete', [1,2,3])"}
                      <a class="btn btn-xs btn-default ajax-get confirm" href="{:url('database/delete', 'ids='.$vo['time'])}" title="删除" data-toggle="tooltip" data-original-title="删除"><i class="mdi mdi-window-close"></i></a>
                      {/if}
                    </div>
                  </td>
                </tr>
                {/volist}
              </tbody>
            </table>
          </div>
        </div>

      </div>
    </div>
        
  </div>
{/block}